import fetch from 'common/src/utils/fetch';

export function getScholarshipInfoByStudentId(data) {
  return fetch({
    url: '/api/majorservice/scholarship/getScholarshipInfoByStudentId/' + data,
    method: 'get',
    headers: {'Content-Type': 'application/json'}
  });
}

//新增
export function addData(data) {
  return fetch({
    url: '/api/majorservice/scholarship/add',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

//编辑
export function editData(data) {
  return fetch({
    url: '/api/majorservice/scholarship/update',
    method: 'put',
    headers: { 'Content-Type': 'application/json' },
    data
  })
}

export function exportData(data) {
  return fetch({
    url: `/api/majorservice/scholarship/exportList`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function deleteData(id) {
  return fetch({
    url:
      '/api/majorservice/scholarship/delete',
    method: 'delete',
    headers: {'Content-Type': 'application/json'},
    params: {
      id: id
    }
  });
}

export function getReportStatus(key) {
  return fetch({
    url: `/api/majorservice/common/exportExcelResult/${key}`,
    method: 'get'
  });
}

export function findList(data) {
  return fetch({
    url:
      '/api/majorservice/scholarship/list',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

